var a = location.search.substring(4, location.search.length)
// console.log(a);
var ul = document.querySelector('div')
var xhr = new XMLHttpRequest()
xhr.open('get', 'https://liu.zzgoodqc.cn/goodsx/detail?id=' + a)
xhr.send()
xhr.onload = () => {
    var b = JSON.parse(xhr.response).data
    // console.log(b);
    ul.innerHTML = `
    <li><img src="${b.img}" alt=""></li>
        <li>商品名：${b.goods_name}</li>
        <li>售价：${b.price}</li>
        `
}
xhr.onerror = (a) => {
    console.log(a);
}